<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<%@ include file="/common-app/taglibs.jsp"%>
<script src="${res_app}/js/app/kjt/dojo.js" type="text/javascript"></script>
<x:parse xml="${param.xmlstr}" var="xmlData" />
<div class="t_bar">买方基本信息</div>
<table class="t_css table01" width="100%" border="0" cellpadding="0"
	cellspacing="1">
<col style="width:18%"/>
<col style="width:24.5%"/>
<col style="width:9%"/>
<col style="width:19.5%"/>
<col style="width:16%"/>
<col style="width:13%"/>
							<tr >
								<td nowrap>
									<span class="color_red">*</span>【买方名称】
								</td>
								<td colspan="5">
									<input type="hidden" name="organizations/organization[1]@sequence_no" value="2" />
									<input type="text" style="width: 437px;" class="required" label="买方名称" name="organizations/organization[1]/cname" id="organizations/organization[1]/cname" value="<x:out select="$xmlData/data/organizations/organization[@sequence_no='2']/cname"/>"  maxlength="100"  />
								</td>
							</tr>
							<tr >
							<td  nowrap>
									<span class="color_red">*</span>【法定代表人】
								</td>
								<td >
									<input type=text style="width:145px;"  class="required"  label="法定代表人" name="organizations/organization[1]/legel_rep_cname" id="organizations/organization[1]/legel_rep_cname" value="<x:out select="$xmlData/data/organizations/organization[@sequence_no='2']/legel_rep_cname"/>" maxlength="50" ></input>
								</td>
								<td nowrap>
									【组织机构证代码/<br/>统一社会信用代码】
								</td>
								<td >
									<%-- <input type="hidden"  name="organizations/organization[1]/org_no" id="organizations/organization[1]/org_no"  value="<x:out select="$xmlData/data/organizations/organization[@sequence_no='2']/org_no"/>"/>
									<input name="organizations/organization[1]/org_code1"  id="organizations/organization[1]/org_code1" value="<x:out select="$xmlData/data/organizations/organization[@sequence_no='2']/org_code1"/>" type="text" style="width: 77px;" maxlength="8" />-
									<input name="organizations/organization[1]/org_code2"   id="organizations/organization[1]/org_code2" value="<x:out select="$xmlData/data/organizations/organization[@sequence_no='2']/org_code2"/>" type="text" style="width: 20px;" maxlength="1" />
						 --%>		<input type="text"
									name="organizations/organization[1]/org_no" id="organizations/organization[1]/org_no"
									class="input_text orgShxyCard orgCard" maxlength="18"
									onkeyup="value=value.replace(/[^a-zA-Z0-9]/ig,'')"
									onchange="value=value.replace(/[^a-zA-Z0-9]/ig,'')"
									value="<x:out select="$xmlData/data/organizations/organization[@sequence_no='2']/org_no" />" label="组织机构代码 /统一社会信用代码"  class= />

								</td>
								<td nowrap>
									【税务登记号】
								</td>
								<td>
									<input type=text  maxlength="18" style="width: 80%;"   name="organizations/organization[1]/swdjh" id="organizations/organization[1]/swdjh" value="<x:out select="$xmlData/data/organizations/organization[@sequence_no='2']/swdjh"/>" ></input>
								</td>			
							<%-- 	<td nowrap>
									【买方国别或地区】<span class="color_red">*</span>
								</td>
								<td>
									<c:set var="buycountry" scope="page"><x:out select="$xmlData/data/organizations/organization[@sequence_no='2']/@country" /></c:set>
									<input type="text"  name="organizations/organization[1]@country_name" id="organizations/organization[1]@country_name" type=text  style="TEXT-ALIGN: center" readonly value="<x:out select="$xmlData/data/organizations/organization[@sequence_no='2']/@country_name"/>">
									<input type="hidden" name="organizations/organization[1]@country" id="organizations/organization[1]@country" type=text  style="TEXT-ALIGN: center" readonly value="<x:out select="$xmlData/data/organizations/organization[@sequence_no='2']/@country"/>">
									<a href="#"><IMG border=0 onclick="xmlSelect('CountryType');isShowDq('1');" src="/stmsres/images/arrow.gif" width="16" height="16"></a>
								</td> --%>
							</tr>
							<tr>
							<td nowrap>
								<span class="color_red">*</span>【国别代码】
								</td>
								<td colspan="1">
								<c:set var="buycountry" scope="page"><x:out select="$xmlData/data/organizations/organization[@sequence_no='2']/country" /></c:set>
									<input type="text"  name="organizations/organization[1]/country_name" id="country_name" type=text style="width:145px;" style="TEXT-ALIGN: center" readonly value="<x:out select="$xmlData/data/organizations/organization[@sequence_no='2']/country_name"/>">
									<input type="hidden" name="organizations/organization[1]/country" id="country" type=text style="width: 75%;" style="TEXT-ALIGN: center"  class="required" label="国别代码" value="<x:out select="$xmlData/data/organizations/organization[@sequence_no='2']/country"/>">
									<a href="#"><IMG border=0 onclick="xmlSelect('CountryType');" src="${res_app}/images/arrow1.gif" width="16" height="16"></a>
								</td>
							<td nowrap>
									<span class="color_red" id="area_code_flag" style="display:none">*</span>【行政区划代码】
								</td>
								<td colspan="3">
								<%-- <input type=text onfocus="InitInput.setInt(this,6)"  label="行政区划代码" style="width:113px" maxlength="6" name="organizations/organization[1]/area_code" id="area_code" value="<x:out select="$xmlData/data/organizations/organization[@sequence_no='2']/area_code"/>"   maxlength=6></input> --%>
								<c:set var="area_code" scope="page"><x:out select="$xmlData/data/organizations/organization[@sequence_no='2']/area_code" /></c:set>
									<input type="text"  name="organizations/organization[1]/area_name" id="area_name" type=text style="width:265px;" style="TEXT-ALIGN: center" readonly value="<x:out select="$xmlData/data/organizations/organization[@sequence_no='2']/area_name"/>">
									<input type="hidden" name="organizations/organization[1]/area_code" id="area_code" type=text style="width: 73%;" style="TEXT-ALIGN: center"   label="行政区划代码" value="<x:out select="$xmlData/data/organizations/organization[@sequence_no='2']/area_code"/>">
									<a href="#"><IMG border=0 onclick="xmlSelect('AreaType');" src="${res_app}/images/arrow1.gif" width="16" height="16"></a>
								</td>
								
							</tr>

							<tr >
								<td nowrap>
									<span class="color_red">*</span>【注册地址】
								</td>
								<td colspan="3">
									<input type=text class="required" label="注册地址" name="organizations/organization[1]/address" style="width:435px;"  id="organizations/organization[1]/address" value="<x:out select="$xmlData/data/organizations/organization[@sequence_no='2']/address"/>" maxlength="100" />
								</td>
								<td nowrap>
									<span class="color_red">*</span>【邮政编码】
								</td>
								<td >
									<input type=text onfocus="InitInput.setInt(this,6)" class="required" label="邮政编码" style="width: 80%;"  maxlength="6" name="organizations/organization[1]/zip_code" id="organizations/organization[1]/zip_code" value="<x:out select="$xmlData/data/organizations/organization[@sequence_no='2']/zip_code"/>"   maxlength=6></input>
								</td>
							</tr>
						
							<tr >						
								<td nowrap >
									<span class="color_red">*</span>【联系人】
								</td>
								<td >
									<input type=text style="width:145px;" class="required" label="联系人"  name="organizations/organization[1]/lxr" id="organizations/organization[1]/lxr" value="<x:out select="$xmlData/data/organizations/organization[@sequence_no='2']/lxr"/>"  maxlegth="50"></input>
								</td>
								<td>
									<span class="color_red">*</span>【联系电话】
								</td>
								<td>
									<input type=text style="width:115px"   class="required" label="联系电话"  name="organizations/organization[1]/lxr_tel" id="organizations/organization[1]/lxr_tel" value="<x:out select="$xmlData/data/organizations/organization[@sequence_no='2']/lxr_tel"/>"  maxlength=25></input>
								</td>
								<td>
									【电子邮件】
								</td>
								<td>
									<input type=text style="width: 80%;" class="email" label="电子邮件" name="organizations/organization[1]/lxr_email" id="organizations/organization[1]/lxr_email"  value="<x:out select="$xmlData/data/organizations/organization[@sequence_no='2']/lxr_email"/>"  maxlength="50" />
								
								</td>
							</tr>
							<tr><td nowrap>
									<span class="color_red">*</span>【机构从事的国民经济行业】
								</td>
								<td nowrap>
								
											<c:set var="val">
								<x:out select="$xmlData/data/proposal/gmjjhy_value" />
							</c:set> <cpt:select id="gmjjhy" style="width:158px" key="seller_belong"
								onChange="initControlValue(this.id);" value="${val}"
								className="hn_iuput_kuang100"></cpt:select> <input type="hidden"
							name="proposal/gmjjhy_value" class="required" id="gmjjhy_value"
							value="<x:out select="$xmlData/data/proposal/gmjjhy_value" />"
							label="机构从事的国民经济行业" /> <input type="hidden" name="proposal/gmjjhy_name"
							value="<x:out select="$xmlData/data/proposal/gmjjhy_name" />" />
											
								</td>
									<td nowrap>
									<span class="color_red">*</span>【单位性质】
								</td>
								<td  colspan="1">
									<input type="hidden" name="organizations/organization[1]/nature_type"   class="required" label="单位性质"  id="nature_type" value="<x:out select="$xmlData/data/organizations/organization[@sequence_no='2']/nature_type"/>">
									<input type="text" style="width:115px"  name="organizations/organization[1]/nature_type_name" id="organizations/organization[1]/nature_type_name"  readonly style="TEXT-ALIGN: center" value="<x:out select="$xmlData/data/organizations/organization[@sequence_no='2']/nature_type_name"/>">
									<a href="#"><img border=0 onclick="xmlSelect('SellerType');" src="${res_app}/images/arrow1.gif" width="16" height="16">
									</a>
								</td>
									<td nowrap>
									<span class="color_red">*</span>【国家技术转移示范机构】
								</td>
								<td >
								<c:set var="val">
								<x:out select="$xmlData/data/proposal/is_gjjszysfjg_value" />
							</c:set> <cpt:select id="is_gjjszysfjg" style="width:100px" key="tech_yesno"
								onChange="initControlValue(this.id);" value="${val}"
								className="hn_iuput_kuang100"></cpt:select> <input type="hidden"
							name="proposal/is_gjjszysfjg_value" class="required" id="is_gjjszysfjg_value"
							value="<x:out select="$xmlData/data/proposal/is_gjjszysfjg_value" />"
							label="国家技术转移示范机构" /> <input type="hidden" name="proposal/is_gjjszysfjg_name"
							value="<x:out select="$xmlData/data/proposal/is_gjjszysfjg_name" />" />
							
								
								</td>
							</tr>
							<tr>
							<td nowrap>
									<span class="color_red" id="qy" style="display:none">*</span>【企业规模】
								</td>
								<td>
								
									<c:set var="val">
								<x:out select="$xmlData/data/proposal/qygm_value" />
							</c:set> <cpt:select id="qygm" style="width:158px" key="tech_scale"
								onChange="initControlValue(this.id);" value="${val}"
								className="hn_iuput_kuang100"></cpt:select> <input type="hidden"
							name="proposal/qygm_value"  id="qygm_value"
							value="<x:out select="$xmlData/data/proposal/qygm_value" />"
							label="企业规模" /> <input type="hidden" id="qygm_name" name="proposal/qygm_name"
							value="<x:out select="$xmlData/data/proposal/qygm_name" />" />
							
								<%-- 	<select  name="organizations/organization[1]@qygm"
										id="organizations/organization[1]@qygm" 
										onchange="setDropTextValue(this);">
										<option value="" selected></option>
										<iristaglib:combox type="tech_scale" key='' />
									</select>
									<input type="hidden" name="organizations/organization[1]@qygm_name" id="organizations/organization[1]@qygm_name"  
										value="<x:out select="$xmlData/data/organizations/organization[@sequence_no='2']/@qygm_name"/>"> --%>
								</td>
								<td nowrap>
									<span class="color_red">*</span>【高新技术企业】
								</td>
								<td>
								
											<c:set var="val">
								<x:out select="$xmlData/data/proposal/is_gxjsqy_value" />
							</c:set> <cpt:select id="is_gxjsqy" style="width:128px" key="tech_yesno"
								onChange="initControlValue(this.id);" value="${val}"
								className="hn_iuput_kuang100"></cpt:select> <input type="hidden"
							name="proposal/is_gxjsqy_value" class="required" id="is_gxjsqy_value"
							value="<x:out select="$xmlData/data/proposal/is_gxjsqy_value" />"
							label="高新技术企业" /> <input type="hidden" name="proposal/is_gxjsqy_name"
							value="<x:out select="$xmlData/data/proposal/is_gxjsqy_name" />" />
							
									
								</td>
								<td nowrap>
									<span class="color_red">*</span>【211大学】
								</td>
								<td>
										<c:set var="val">
								<x:out select="$xmlData/data/proposal/is_211dx_value" />
							</c:set> <cpt:select id="is_211dx" style="width:100px" key="tech_yesno"
								onChange="initControlValue(this.id);" value="${val}"
								className="hn_iuput_kuang100"></cpt:select> <input type="hidden"
							name="proposal/is_211dx_value" class="required" id="is_211dx_value"
							value="<x:out select="$xmlData/data/proposal/is_211dx_value" />"
							label="211大学" /> <input type="hidden" name="proposal/is_211dx_name"
							value="<x:out select="$xmlData/data/proposal/is_211dx_name" />" />
							
									
								
								</td>
							</tr>
							<tr style="display:none" id="nature2"><td nowrap>
									<span class="color_red">*</span>【是否研发机构】
								</td>
								<td>
										<c:set var="val">
								<x:out select="$xmlData/data/proposal/is_yfjg_value" />
							</c:set> <cpt:select id="is_yfjg" style="width:158px" key="tech_yesno"
								onChange="initControlValue(this.id);" value="${val}"
								className="hn_iuput_kuang100"></cpt:select> <input type="hidden"
							name="proposal/is_yfjg_value"  id="is_yfjg_value"
							value="<x:out select="$xmlData/data/proposal/is_yfjg_value" />"
							label="是否研发机构" /> <input type="hidden" name="proposal/is_yfjg_name"
							value="<x:out select="$xmlData/data/proposal/is_yfjg_name" />" />
							
								
								</td>
									<td nowrap id="td_is_zzkyys__title">
									<span class="color_red">*</span>【是否转制科研院所】
								</td>
								<td colspan="3" id="td_is_zzkyys_name"> 
										<c:set var="val">
								<x:out select="$xmlData/data/proposal/is_zzkyys_value" />
							</c:set> <cpt:select id="is_zzkyys" style="width:128px" key="tech_yesno"
								onChange="initControlValue(this.id);" value="${val}"
								className="hn_iuput_kuang100"></cpt:select> <input type="hidden"
							name="proposal/is_zzkyys_value"  id="is_zzkyys_value"
							value="<x:out select="$xmlData/data/proposal/is_zzkyys_value" />"
							label="是否转制科研院所" /> <input type="hidden" name="proposal/is_zzkyys_name"
							value="<x:out select="$xmlData/data/proposal/is_zzkyys_name" />" />
							
								
								</td>
							
								</tr>
							<tr>
								<td nowrap>
									<span class="color_red">*</span>【是否国家级高新区内企业】
								</td>
								<td>
								<c:set var="val">
								<x:out select="$xmlData/data/proposal/is_gjjgxqnqy_value" />
							</c:set> <cpt:select id="is_gjjgxqnqy" style="width:158px" key="tech_yesno"
								onChange="initControlValue(this.id);setDropTextValue(this);setZQDMtatus('is_gjjgxqnqy');" value="${val}"
								className="hn_iuput_kuang100"></cpt:select> 
								<input type="hidden"
							name="proposal/is_gjjgxqnqy_value" class="required" id="is_gjjgxqnqy_value"
							value="<x:out select="$xmlData/data/proposal/is_gjjgxqnqy_value" />"
							label="是否国家级高新区内企业" />
							 <input type="hidden" name="proposal/is_gjjgxqnqy_name"
							value="<x:out select="$xmlData/data/proposal/is_gjjgxqnqy_name" />" />
							
									
								</td>
								
								<td nowrap>
									<SPAN id="is_gjjgxqnqy2" style="display:none"><span class="color_red">*</span>【所属园区】</SPAN>
								</td>
								<td colspan="3" >
									<%-- <input type=text style="width: 73%;" name="organizations/organization[1]/developmentInfo1" id="organizations/organization[1]/developmentInfo1" value="<x:out select="$xmlData/data/organizations/organization[@sequence_no='2']/developmentInfo1"/>" ></input> --%>
								
									<input type="hidden" id ="is_gjjgxqnqy3" name="organizations/organization[1]/park"    label="所属园区"   value="<x:out select="$xmlData/data/organizations/organization[@sequence_no='2']/park"/>">
									<input type="text" id="is_gjjgxqnqy4" style="display:none;width:115px;"   name="organizations/organization[1]/park_name"   readonly  value="<x:out select="$xmlData/data/organizations/organization[@sequence_no='2']/park_name"/>">
									<a href="#" id="is_gjjgxqnqy5" style="display:none"><img border=0 onclick="xmlSelect('ParkType');" src="${res_app}/images/arrow1.gif" width="16" height="16">
									</a>
								</td>

							</tr>
							<tr>
							<td nowrap>
									<span class="color_red">*</span>【是否技术转移机构】
								</td>
								<td>
										<c:set var="val">
								<x:out select="$xmlData/data/proposal/is_jszyjg_value" />
							</c:set> <cpt:select id="is_jszyjg" style="width:158px" key="tech_yesno"
								onChange="initControlValue(this.id);setDropTextValue(this);setZQDMtatus('is_jszyjg');" value="${val}"
								className="hn_iuput_kuang100"></cpt:select> 
								<input type="hidden"
							name="proposal/is_jszyjg_value" class="required" id="is_jszyjg_value"
							value="<x:out select="$xmlData/data/proposal/is_jszyjg_value" />"
							label="是否技术转移机构" />
							 <input type="hidden" name="proposal/is_jszyjg_name"
							value="<x:out select="$xmlData/data/proposal/is_jszyjg_name" />" />
							
							<%-- 		<c:set var="val">
								<x:out select="$xmlData/data/proposal/is_jszyjg_value" />
							</c:set> <cpt:select id="is_jszyjg" style="width:126px" key="tech_yesno"
								onChange="initControlValue(this.id);setDropTextValue(this);setZYYWtatus('is_jszyjg');" value="${val}"
								className="hn_iuput_kuang100"></cpt:select> <input type="hidden"
							name="proposal/is_jszyjg_value" class="required" id="is_jszyjg_value"
							value="<x:out select="$xmlData/data/proposal/is_jszyjg_value" />"
							label="是否技术转移机构" /> <input type="hidden" name="proposal/is_jszyjg_name"
							value="<x:out select="$xmlData/data/proposal/is_jszyjg_name" />" />
							 --%>
								
								</td>								
								<td nowrap >
									<span id="is_jszyjg2" style="display:none"><span class="color_red">*</span>【主营业务】</span>&nbsp;
									</td>
									<td >
									<span id="is_jszyjg3" style="display:none">
										<c:set var="val">
											<x:out select="$xmlData/data/proposal/is_jszyjglx_value" />
										</c:set> <cpt:select id="is_jszyjglx" style="width:128px" key="tech_business"
											onChange="initControlValue(this.id);setZQDMtatus('is_jszyjglx');" value="${val}"
											className="hn_iuput_kuang100"></cpt:select> 
											<input type="hidden"
										name="proposal/is_jszyjglx_value"  id="is_jszyjglx_value"
										value="<x:out select="$xmlData/data/proposal/is_jszyjglx_value" />"
										label="主营业务" />
										 <input type="hidden" name="proposal/is_jszyjglx_name" id="is_jszyjglx_name"
										value="<x:out select="$xmlData/data/proposal/is_jszyjglx_name" />" />
									</span>&nbsp;
									</td>
									<td nowrap>
									<span id="is_jszyjglx2" style="display:none"><span class="color_red">*</span>【技术转移机构类型】</span>	&nbsp;
								</td>
								<td >
								<span id="is_jszyjglx3" style="display:none">
									<input type=text name="organizations/organization[1]/other" label="技术转移机构类型" id="other" style="width:80%"  value="<x:out select="$xmlData/data/organizations/organization[@sequence_no='2']/other"/>"  maxlength="50"></input>
								</span>&nbsp;
								</td>
							</tr>
							
							<tr style="display:none" id="company">
							<td nowrap>
									<span class="color_red">*</span>【是否上市公司】
								</td>
								<td >
								<c:set var="val">
								<x:out select="$xmlData/data/proposal/is_public_company_value" />
							</c:set> <cpt:select id="is_public_company" style="width:158px" key="tech_yesno"
								onChange="initControlValue(this.id);setZQDMtatus('is_public_company');" value="${val}"
								className="hn_iuput_kuang100"></cpt:select> <input type="hidden"
							name="proposal/is_public_company_value"  id="is_public_company_value"
							value="<x:out select="$xmlData/data/proposal/is_public_company_value" />"
							label="是否上市公司" /> <input type="hidden" name="proposal/is_public_company_name"
							value="<x:out select="$xmlData/data/proposal/is_public_company_name" />" />
								
								</td>								
								<td >
									<span id="is_public_company2" style="display:none" ><span class="color_red">*</span>【证券代码】</span>&nbsp;
								</td>
								<td colspan="3">
									<span id="is_public_company3" style="display:none">
									<input type=text  maxlength="6" style="width:24%" label="证券代码" name="organizations/organization[1]/security" id="security" value="<x:out select="$xmlData/data/organizations/organization[@sequence_no='2']/security"/>" ></input>
									</span>&nbsp;
								</td>
							</tr>
						
</table>
<script type="text/javascript">
	function xmlSelect(str){
			//window.showModalDialog("jsp/xmlSelect/xmltree.jsp?str="+str,window,'');
			window.open(ctx+'/ajax/toXmlSelect?str='+str,'','resizable=no,height=600,width=250,scrollbars=yes,status=yes,left=550,top=250');
		//window.open(ctx+'/ajax/toXmlSelect?str='+str,'dialogWidth:200px;dialogHeight:600px;dialogLeft:750;dialogTop:150;status:no;help:no');
	}
	
	function TreeBackVal(res,type){
		if(type=="ContractType"){
			document.getElementById("ctr_type1").value=res.txt1;
			document.getElementById("ctr_type_code").value=res.val1;
			var flag_ctr_type=$("#ctr_type_code").val().substr(0,4);
			if(flag_ctr_type=='0201'||flag_ctr_type=='0202'){
				$("#flag_ctr_type").val('1');
			}else{
				$("#flag_ctr_type").val('0');
			}
		}
		if(type=="ProgramType"){
			document.getElementById("plan_source1").value=res.txt1;
			document.getElementById("plan_source_code").value=res.val1;
			var programType=$("#plan_source_code").val().substr(0,4);
			if(programType=='0101'){
				$("#reg_no1").css('display','');
				$("#reg_no2").css('display','');
				$("#sub_name").addClass("required");
				$("#sub_code").addClass("required");
				$("#sub_code").addClass("minlength:12");
				//$("#reg_no").addClass("required");
			}else{
				$("#reg_no1").css('display','none');
				$("#reg_no2").css('display','none');
				$("#sub_name").removeClass("required");
				$("#sub_code").removeClass("required");
				$("#sub_code").removeClass("minlength:12");
				//$("#reg_no").removeClass("required");
				$("#sub_name").val('');
				$("#sub_code").val('');
				$("#reg_no").val('');
			}
		}
		if(type=="KnowType"){
		document.getElementById("kr_no1").value=res.txt1;
		document.getElementById("kr_no_code").value=res.val1;
			var knowType=$("#kr_no_code").val().substr(0,4);
			if(knowType=='0402'){
				$("#zlsl1").css('display','');
				$("#zlsl2").css('display','');
				$("#zlsl").addClass("required");
				$("#zlsa").addClass("required");
				$("#zlsb").addClass("required");
				$("#zlsc").addClass("required");
				
			}else{
				$("#zlsl1").css('display','none');
				$("#zlsl2").css('display','none');
				$("#zlsl").removeClass("required");
				$("#zlsa").removeClass("required");
				$("#zlsb").removeClass("required");
				$("#zlsc").removeClass("required");
				$("#zlsl").val('');
				$("#zlsa").val('');
				$("#zlsb").val('');
				$("#zlsc").val('');
		}
		
		}
		if(type=="TechnologyType"){
		document.getElementById("prp_base_info/tech_area1").value=res.txt1;
		document.getElementById("prp_base_info/tech_area_code").value=res.val1;
		
		
		}
		//买方性质控制逻辑
		if(type=="SellerType"){
		document.getElementById("organizations/organization[1]/nature_type_name").value=res.txt1;
		document.getElementById("nature_type").value=res.val1;
		var nature_type=$("#nature_type").val().substr(0,4);
		if(nature_type=='0602'){
			$("#nature2").css('display','');
			$("#is_yfjg_value").addClass("required");
			$("#is_zzkyys_value").addClass("required");
		
			$("#is_yfjg_value").val('');
			$("#is_zzkyys_value").val('');
			$("#is_yfjg option:first").attr("selected", "selected");
			$("#is_zzkyys option:first").attr("selected", "selected");
			$("#td_is_zzkyys__title").css('display','');
			$("#td_is_zzkyys_name").css('display','');
			$("#company").css('display','none');
			$("#is_public_company_value").removeClass("required");
			$("#is_public_company_value").val('');
			$("#security").removeClass("required");
			$("#security").val('');
			$("#is_public_company option:first").attr("selected", "selected");
			$("#qygm option:first").attr("selected", "selected");
			$("#qy").css('display','none');
			$("#qygm_value").removeClass("required");
			$("#qygm_value").val('');
			$("#qygm_name").val('');
		}
		//企业法人, 是否研发机构, 是否转制机构， 是否上市公司必填
		else if(nature_type=='0604'){
			$("#nature2").css('display','');
			$("#is_yfjg_value").addClass("required");
			$("#is_zzkyys_value").addClass("required");
			$("#is_yfjg_value").val('');
			$("#is_zzkyys_value").val('');
			$("#is_yfjg option:first").attr("selected", "selected");
			$("#is_zzkyys option:first").attr("selected", "selected");
			$("#td_is_zzkyys__title").css('display','');
			$("#td_is_zzkyys_name").css('display','');
			$("#qygm option:first").attr("selected", "selected");
			$("#is_public_company option:first").attr("selected", "selected");
			$("#company").css('display','');
			$("#is_public_company_value").addClass("required");
			$("#is_public_company2").css('display','none');
			$("#is_public_company3").css('display','none');
			$("#qy").css('display','');
			$("#qygm_value").addClass("required");
		}
		//机关法人,是否研发机构必填
		else if(nature_type=='0601' || nature_type=='0603' || nature_type=='0606'){
			$("#nature2").css('display','');
			$("#is_yfjg_value").addClass("required");
			$("#is_yfjg_value").val('');
			$("#is_zzkyys_value").val('');
			$("#is_yfjg option:first").attr("selected", "selected");
			
			//其他组织-其他国内组织
			if($("#nature_type").val() == '060602')
			{
				$("#is_zzkyys_value").addClass("required");
				$("#td_is_zzkyys__title").css('display','');
				$("#td_is_zzkyys_name").css('display','');
			}
			else{
				$("#is_zzkyys_value").removeClass("required");
				$("#td_is_zzkyys__title").css('display','none');
				$("#td_is_zzkyys_name").css('display','none');	
			}
			$("#is_zzkyys option:first").attr("selected", "selected");
			$("#qygm option:first").attr("selected", "selected");
			$("#company").css('display','none');
			$("#is_public_company_value").removeClass("required");
			$("#is_public_company_value").val('');
			$("#security").removeClass("required");
			$("#security").val('');
			$("#is_public_company option:first").attr("selected", "selected");
			$("#qy").css('display','none');
			$("#qygm_value").removeClass("required");
			$("#qygm_value").val('');
			$("#qygm_name").val('');
		}
		else{
			$("#nature2").css('display','none');
			$("#is_yfjg_value").removeClass("required");
			$("#is_zzkyys_value").removeClass("required");
			//$("#zlsb").removeClass("required");
			//$("#zlsc").removeClass("required");
			$("#is_yfjg_value").val('');
			$("#is_yfjg_name").val('');
			$("#is_zzkyys_value").val('');
			$("#is_zzkyys_name").val('');
			$("#is_yfjg option:first").attr("selected", "selected");
			$("#is_zzkyys option:first").attr("selected", "selected");
			$("#qygm option:first").attr("selected", "selected");
			$("#company").css('display','none');
			$("#is_public_company_value").removeClass("required");
			$("#is_public_company_value").val('');
			$("#security").removeClass("required");
			$("#security").val('');
			$("#is_public_company option:first").attr("selected", "selected");
			$("#qy").css('display','none');
			$("#qygm_value").removeClass("required");
			$("#qygm_value").val('');
			$("#qygm_name").val('');
	}
		
		}
		if(type=="AreaType"){
		document.getElementById("area_name").value=res.txt1;
		document.getElementById("area_code").value=res.val1;
		
		
		}
		if(type=="CountryType"){
			document.getElementById("country_name").value=res.txt1;
			document.getElementById("country").value=res.val1;
			if($("#country").val()=='070142'){
				$("#area_code_flag").css("display","");
				$("#area_code").addClass("required");
			}else{
				$("#area_code_flag").css("display","none");
				$("#area_code").removeClass("required");
				$("#area_code").val('');
				$("#area_name").val('');
			}
		
		}
		if(type=="ParkType"){
			document.getElementById("is_gjjgxqnqy4").value=res.txt1;
			document.getElementById("is_gjjgxqnqy3").value=res.val1;
			
			
			}
		if(type=="ParkType1"){
			document.getElementById("is_gjjgxqnqy14").value=res.txt1;
			document.getElementById("is_gjjgxqnqy13").value=res.val1;
			
			
			}
		}
	function getFenLeiForm(objId)
	{
		var txt_1 = dojo.byId(objId);
		var txt_1_name = dojo.byId(objId+"_name");
		var url = "";
		if( txt_1.value != "" )
		{
			alert(txt_1.value);
			url = ctx+"/ajax/typeData?DataType=BuyerSiteData&cmd=edit&nodeId="+txt_1.value;
		}
		else
		{
			url = ctx+"/ajax/typeData?DataType=BuyerSiteData&cmd=open&nodeId="+txt_1.value;
		}
		
		
		var result = window.open(url,"obj","height:500px;left:(screen.width/2)px;top:(screen.height/2)px;width:400px;center:yes;resizable:no;status:no;");

		if(result == undefined){
			result = window.returnValue;
		}

		if( result )
		{
			txt_1.value = result[0];
			txt_1_name.value = result[1];
		}
		else
		{
			
		}

	}
	function setvalue(obj,item) {	
		var zyyw="";
		for(var i=0;i<2;i++) {
			if(document.getElementById("organizations/organization["+i+"]@"+obj).value==1||document.getElementById("organizations/organization["+i+"]@"+obj).value==8) {
				if(i==0){
					if(item=="zyyw")
					    zyyw=document.getElementById("organizations/organization["+i+"]@"+item).value
					for(var j=1;j<3;j++) {
						var tbl = document.getElementById("sell"+item+j);			
						tbl.style.display="";	
						var tbl2 = document.getElementById("sellqt"+j);	
						if(zyyw=='08'&&tbl.style.display=="")
							tbl2.style.display="";
					}
				}else{
					if(item=="zyyw")
						zyyw=document.getElementById("organizations/organization["+i+"]@"+item).value
					for(var k=1;k<3;k++){
						var tbl = document.getElementById("buy"+item+k);			
						tbl.style.display="";	
						var tbl2 = document.getElementById("buyqt"+k);	
						if(zyyw=='08'&&tbl.style.display=="")
							tbl2.style.display="";
					}
				}
			}
		}
	}
	function CalBudgetLoop(calex,itemtitle,itemend)
	{
		
		var total = calex.substring(0,calex.indexOf("="));
		var arrTmp = calex.substring(calex.indexOf("=")+1,calex.length).split("+");

		var totalnum = 0;

		for(var i=0;i<arrTmp.length;i++)
		{
			var obj = document.getElementsByName(itemtitle + arrTmp[i] + itemend);
			totalnum = totalnum + calItemNum(obj[0]);
		}
		
		var total_obj = document.getElementsByName(itemtitle + total + itemend);
		total_obj[0].value = BitFormat(totalnum);
		Format(total_obj[0]);
	}

	<c:if test="${param.Action == 'view'}">
			clearPrpGetInfoFlag();
	</c:if>
	
	function isChina(){
	name=document.getElementById("organizations/organization[1]/country_name").value;
	if(name!='中国'&&name!='台湾')
	alert("买方国别为外国不能填写买方地区");
	
	}
	$(function(){
		//var temp = $("#is_gjjgxqnqy_value").val();
		if($("#country").val()=='070142'){
			$("#area_code_flag").css("display","");
			$("#area_code").addClass("required");
		}else{
			$("#area_code_flag").css("display","none");
			$("#area_code").removeClass("required");
		}
			setZQDMtatus('is_gjjgxqnqy');
			setZQDMtatus('is_jszyjg');
			setZQDMtatus('is_jszyjglx');
			setZQDMtatus('is_jszyjg_my');
			setZQDMtatus('is_jszyjg_mylx');
			
			setZQDMtatus('is_public_company1');
			setZQDMtatus('is_gjjgxqnqy1');
			var nature_type=$("#nature_type").val().substr(0,4);
			if(nature_type=='0602'){
				$("#nature2").css('display','');
				$("#is_yfjg_value").addClass("required");
				$("#is_zzkyys_value").addClass("required");
				
				
				$("#company").css('display','none');
				$("#is_public_company_value").removeClass("required");
				$("#is_public_company_value").val('');
				$("#is_public_company2").css('display','none');
				$("#is_public_company3").css('display','none');
				$("#security").removeClass("required");
				$("#security").val('');
				$("#is_public_company option:first").attr("selected", "selected");
				
				$("#qy").css('display','none');
				$("#qygm_value").removeClass("required");
				$("#qygm_value").val('');

			}else if(nature_type=='0604'){
				$("#nature2").css('display','');
				$("#is_yfjg_value").addClass("required");
				$("#is_zzkyys_value").addClass("required");
				$("#company").css('display','');
				$("#is_public_company_value").addClass("required");
				$("#is_public_company2").css('display','none');
				$("#is_public_company3").css('display','none');
				
				$("#qy").css('display','');
				$("#qygm_value").addClass("required");
			}
			//机关法人,是否研发机构必填
			else if(nature_type=='0601' || nature_type=='0603' || nature_type=='0606'){
				$("#nature2").css('display','');
				$("#is_yfjg_value").addClass("required");
				//$("#is_yfjg_value").val('');
				$("#is_zzkyys_value").val('');
				$("#is_yfjg option:first").attr("selected", "selected");
				
				//其他组织-其他国内组织
				if($("#nature_type").val() == '060602')
				{
					$("#is_zzkyys_value").addClass("required");
					$("#td_is_zzkyys__title").css('display','');
					$("#td_is_zzkyys_name").css('display','');
				}
				else{
					$("#is_zzkyys_value").removeClass("required");
					$("#td_is_zzkyys__title").css('display','none');
					$("#td_is_zzkyys_name").css('display','none');	
				}
				$("#is_zzkyys option:first").attr("selected", "selected");
				$("#qygm option:first").attr("selected", "selected");
				$("#company").css('display','none');
				$("#is_public_company_value").removeClass("required");
				$("#is_public_company_value").val('');
				$("#security").removeClass("required");
				$("#security").val('');
				$("#is_public_company option:first").attr("selected", "selected");
				$("#qy").css('display','none');
				$("#qygm_value").removeClass("required");
			}
			else{
				$("#nature2").css('display','none');
				$("#is_yfjg_value").removeClass("required");
				$("#is_zzkyys_value").removeClass("required");
				//$("#zlsb").removeClass("required");
				//$("#zlsc").removeClass("required");
				$("#is_yfjg_value").val('');
				$("#is_yfjg_name").val('');
				$("#is_zzkyys_value").val('');
				$("#is_zzkyys_name").val('');
				$("#is_yfjg option:first").attr("selected", "selected");
				$("#is_zzkyys option:first").attr("selected", "selected");
				
				$("#company").css('display','none');
				$("#is_public_company_value").removeClass("required");
				$("#is_public_company_value").val('');
				$("#security").removeClass("required");
				$("#security").val('');
				$("#is_public_company option:first").attr("selected", "selected");
				$("#qy").css('display','none');
				$("#qygm_value").removeClass("required");
				$("#qygm_value").val('');
		}
			setZQDMtatus('is_public_company');
	});
	function setZQDMtatus(obj)
	{			
		if(obj=="seller")
		{
			
			var id = document.getElementById("organizations/organization[0]/is_public_company").value;	
			if(id==1){
				for(var i=1;i<3;i++){
					var tbl = document.getElementById("sellzqdm"+i);			
					tbl.style.display="";				
				}
			}else{			
				for(var i=1;i<3;i++){
				var tbl = document.getElementById("sellzqdm"+i);			
				tbl.style.display="none";					
			}
			}
		}else if(obj=="is_public_company"){
			var value=$("#"+obj+"_value").val();
			if(value=='01'){
				$("#"+obj+"2").css("display",'');
				$("#"+obj+"3").css("display",'');
				$("#security").addClass("required");
				
			}else{
				$("#"+obj+"2").css("display",'none');
				$("#"+obj+"3").css("display",'none');
				$("#security").removeClass("required");
				$("#security").val('');
			}
		}else if(obj=="is_public_company1"){
			var value=$("#"+obj+"_value").val();
			if(value=='01'){
				$("#"+obj+"2").css("display",'');
				$("#"+obj+"3").css("display",'');
				$("#security1").addClass("required");
				
			}else{
				$("#"+obj+"2").css("display",'none');
				$("#"+obj+"3").css("display",'none');
				$("#security1").removeClass("required");
				$("#security1").val('');
			}
		}
		else if(obj=="is_jszyjg"){
			var value=$("#"+obj+"_value").val();
			if(value=='01'){
				$("#"+obj+"2").css("display",'');
				$("#"+obj+"3").css("display",'');
			//	alert($("#is_jszyjglx").find("option:selected").text());
				$("#is_jszyjglx option:first").attr("selected","selected");
				$("#is_jszyjglx_value").addClass("required");
				
			}else{
				$("#"+obj+"2").css("display",'none');
				$("#"+obj+"3").css("display",'none');
				$("#is_jszyjglx_value").val('');
				$("#is_jszyjglx_name").val('');
				$("#is_jszyjglx option:first").attr("selected", "selected");
				//alert($("#is_jszyjglx option:eq(3)").val());
				$("#is_jszyjglx_value").removeClass("required");
				$("#other").val('');
				setZQDMtatus("is_jszyjglx");
			}
		}else if(obj=="is_jszyjglx"){
			var value=$("#"+obj+"_value").val();
			if(value=='460108'){
				$("#"+obj+"2").css("display",'');
				$("#"+obj+"3").css("display",'');
				$("#other").addClass("required");
			}else{
				$("#"+obj+"2").css("display",'none');
				$("#"+obj+"3").css("display",'none');
				$("#other").removeClass("required");
				$("#other").val('');
			}
		}else if(obj=="is_jszyjg_my"){
			var value=$("#"+obj+"_value").val();
			if(value=='01'){
				$("#"+obj+"2").css("display",'');
				$("#"+obj+"3").css("display",'');
			//	alert($("#is_jszyjg_mylx").find("option:selected").text());
				$("#is_jszyjg_mylx option:first").attr("selected","selected");
				$("#is_jszyjg_mylx_value").addClass("required");
				
			}else{
				$("#"+obj+"2").css("display",'none');
				$("#"+obj+"3").css("display",'none');
				$("#is_jszyjg_mylx_value").val('');
				$("#is_jszyjg_mylx_name").val('');
				$("#is_jszyjg_mylx option:first").attr("selected", "selected");
				//alert($("#is_jszyjg_mylx option:eq(3)").val());
				$("#is_jszyjg_mylx_value").removeClass("required");
				$("#other1").val('');
				setZQDMtatus("is_jszyjg_mylx");
			}
		}else if(obj=="is_jszyjg_mylx"){
			var value=$("#"+obj+"_value").val();
			if(value=='08'){
				$("#"+obj+"2").css("display",'');
				$("#"+obj+"3").css("display",'');
				$("#other1").addClass("required");
			}else{
				$("#"+obj+"2").css("display",'none');
				$("#"+obj+"3").css("display",'none');
				$("#other1").removeClass("required");
				$("#other1").val('');
			}
		}
		else{
			var value=$("#"+obj+"_value").val();
			if(value=='01'){
				$("#"+obj+"2").css("display",'');
				$("#"+obj+"4").css("display",'');
				$("#"+obj+"5").css("display",'');
				$("#"+obj+"3").addClass("required");
			}else{
				$("#"+obj+"2").css("display",'none');
				$("#"+obj+"4").css("display",'none');
				$("#"+obj+"5").css("display",'none');
				$("#"+obj+"4").val('');
				$("#"+obj+"3").val('');
				$("#"+obj+"3").removeClass("required");
			}
		}
	}
	function setDropTextValue(obj)
	{
		var strname = obj.name;
		var objt = document.getElementById(strname+"_name");
		if(!objt) return;

		if(objt.type&&obj.type=='select-one')
		{
			if(obj.selectedIndex==-1)
			{
				setTagValue(objt,"");
			}
			else
			{ 
				//stms-1864 修复:chrome/firefox点击父页面的"附件管理",新上传附件文件后,附件类型丢失  [wdd 2013-7-8]
				obj.options[obj.selectedIndex].setAttribute("selected",true);
				setTagValue(objt,obj.options[obj.selectedIndex].text);
			}
		}
	}
</script>